﻿namespace TriangleGames.TrainResEditor
{
    using TriangleGames.TrainRes;
    using System;
    using System.Runtime.CompilerServices;
    using UnityEditor;
    using UnityEngine;

    [Serializable]
    internal static class FsmEditorSettings
    {
        [CompilerGenerated]
        private static bool AddPrefabLabel__BackingField;
        [CompilerGenerated]
        private static bool AutoAddTrainResGUI__BackingField;
        [CompilerGenerated]
        private static bool AutoLoadPrefabs__BackingField;
        [CompilerGenerated]
        private static bool AutoSelectGameObject__BackingField;
        [CompilerGenerated]
        private static bool BreakpointsEnabled__BackingField;
        [CompilerGenerated]
        private static bool CheckForCollisionEventErrors__BackingField;
        [CompilerGenerated]
        private static bool CheckForDuplicateTransitionEvent__BackingField;
        [CompilerGenerated]
        private static bool CheckForEventNotUsed__BackingField;
        [CompilerGenerated]
        private static bool CheckForMouseEventErrors__BackingField;
        [CompilerGenerated]
        private static bool CheckForObsoleteActions__BackingField;
        [CompilerGenerated]
        private static bool CheckForPrefabRestrictions__BackingField;
        [CompilerGenerated]
        private static bool CheckForRequiredComponent__BackingField;
        [CompilerGenerated]
        private static bool CheckForRequiredField__BackingField;
        [CompilerGenerated]
        private static bool CheckForTransitionMissingEvent__BackingField;
        [CompilerGenerated]
        private static bool CheckForTransitionMissingTarget__BackingField;
        [CompilerGenerated]
        private static bool CloseActionBrowserOnEnter__BackingField;
        [CompilerGenerated]
        private static bool ColorLinks__BackingField;
        [CompilerGenerated]
        private static TriangleGames.TrainResEditor.FsmEditorStyles.ColorScheme ColorScheme__BackingField;
        [CompilerGenerated]
        private static int ConsoleActionReportSortOptionIndex__BackingField;
        [CompilerGenerated]
        private static bool DebugActionParameters__BackingField;
        [CompilerGenerated]
        private static Color DebugLookAtColor__BackingField;
        [CompilerGenerated]
        private static Color DebugRaycastColor__BackingField;
        [CompilerGenerated]
        private static bool DebugVariables__BackingField;
        [CompilerGenerated]
        private static bool DimUnusedActionParameters__BackingField;
        [CompilerGenerated]
        private static bool DisableActionBrowerWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DisableEditorWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DisableErrorCheckerWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DisableEventBrowserWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DisableInspectorWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DisableToolWindowsWhenPlaying__BackingField;
        [CompilerGenerated]
        private static bool DrawTrainResGizmoInHierarchy__BackingField;
        [CompilerGenerated]
        private static bool DrawTrainResGizmos__BackingField;
        [CompilerGenerated]
        private static float EdgeScrollSpeed__BackingField;
        [CompilerGenerated]
        private static float EdgeScrollZone__BackingField;
        [CompilerGenerated]
        private static bool EnableDebugFlow__BackingField;
        [CompilerGenerated]
        private static bool EnableLogging__BackingField;
        [CompilerGenerated]
        private static bool EnableRealtimeErrorChecker__BackingField;
        [CompilerGenerated]
        private static bool EnableWatermarks__BackingField;
        [CompilerGenerated]
        private static bool ExpandDebuggingSettings__BackingField;
        [CompilerGenerated]
        private static bool ExpandErrorCheckSettings__BackingField;
        [CompilerGenerated]
        private static bool ExpandGeneralSettings__BackingField;
        [CompilerGenerated]
        private static bool ExpandGraphViewSettings__BackingField;
        [CompilerGenerated]
        private static bool FrameSelectedState__BackingField;
        [CompilerGenerated]
        private static bool FsmBrowserShowFullPath__BackingField;
        [CompilerGenerated]
        private static int GameStateIconSize__BackingField;
        [CompilerGenerated]
        private static TriangleGames.TrainResEditor.GraphViewLinkStyle GraphViewLinkStyle__BackingField;
        [CompilerGenerated]
        private static bool HideObsoleteActions__BackingField;
        [CompilerGenerated]
        private static bool HideUnusedEvents__BackingField;
        [CompilerGenerated]
        private static bool HideUnusedParams__BackingField;
        [CompilerGenerated]
        private static bool JumpToBreakpoint__BackingField;
        [CompilerGenerated]
        private static bool KeepActionBrowserOpen__BackingField;
        [CompilerGenerated]
        private static bool LoadAllPrefabs__BackingField;
        [CompilerGenerated]
        private static bool LockGraphView__BackingField;
        [CompilerGenerated]
        private static bool LogCollapseSystemEvents__BackingField;
        [CompilerGenerated]
        private static bool LogHideUnusedEvents__BackingField;
        [CompilerGenerated]
        private static bool LogPauseOnSelect__BackingField;
        [CompilerGenerated]
        private static bool LogShowSentBy__BackingField;
        [CompilerGenerated]
        private static int MaxReEnterStateCount__BackingField;
        [CompilerGenerated]
        private static bool MirrorDebugLog__BackingField;
        [CompilerGenerated]
        private static string NewStateName__BackingField;
        [CompilerGenerated]
        private static string ScreenshotsPath__BackingField;
        [CompilerGenerated]
        private static int SelectedActionCategory__BackingField;
        [CompilerGenerated]
        private static bool SelectFSMInGameView__BackingField;
        [CompilerGenerated]
        private static bool SelectNewVariables__BackingField;
        [CompilerGenerated]
        private static bool SelectStateOnActivated__BackingField;
        [CompilerGenerated]
        private static bool ShowActionParameters__BackingField;
        [CompilerGenerated]
        private static bool ShowActionPreview__BackingField;
        [CompilerGenerated]
        private static bool ShowCommentsInGraphView__BackingField;
        [CompilerGenerated]
        private static bool ShowEditWhileRunningWarning__BackingField;
        [CompilerGenerated]
        private static bool ShowHints__BackingField;
        [CompilerGenerated]
        private static bool ShowScrollBars__BackingField;
        [CompilerGenerated]
        private static bool ShowStateDescription__BackingField;
        [CompilerGenerated]
        private static bool ShowStateLabelsInGameView__BackingField;
        [CompilerGenerated]
        private static int SnapGridSize__BackingField;
        [CompilerGenerated]
        private static string StartStateName__BackingField;
        [CompilerGenerated]
        private static int StateMaxWidth__BackingField;
        [CompilerGenerated]
        private static bool SyncLogSelection__BackingField;
        [CompilerGenerated]
        private static bool UnloadPrefabs__BackingField;
        public const int MaxStateNameLength = 100;
        public const string ProductCopyright = "\x00a9 Triangle-Games. 版权所有.";
        public const string ProductName = "TrainRes";
        public const string ProductUrl = "http://www.triangle-games.com/";
        private static Vector2 scrollPosition;

        private static void ApplySettings()
        {
            FsmLog.MirrorDebugLog = MirrorDebugLog;
            FsmLog.LoggingEnabled = EnableLogging;
            FsmLog.EnableDebugFlow = EnableDebugFlow;
            FsmDebugger.EnableBreakpoints(BreakpointsEnabled);
            FsmDebugger.SetInfiniteLoopThreshold(MaxReEnterStateCount);
            TrainResFSMCore.DrawGizmos = DrawTrainResGizmos;
            Fsm.DebugLookAtColor = DebugLookAtColor;
            Fsm.DebugRaycastColor = DebugRaycastColor;
            TrainResGUICore.EnableStateLabels = ShowStateLabelsInGameView;
        }

        private static void DoDebuggingSettings()
        {
            MaxReEnterStateCount = EditorGUILayout.IntField(new GUIContent("无限循环阈值", "一个状态循环进入超过最大次数，将会出现中断。"), MaxReEnterStateCount, new GUILayoutOption[0]);
            ShowStateLabelsInGameView = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("在游戏视图中显示状态标签", "在游戏视图中打开或关闭状态标签"), ShowStateLabelsInGameView);
            JumpToBreakpoint = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("跳到断点/错误", "编辑器是否自动跳到断点或错误点. 注意: 此选项可以在不同的状态机上设置."), JumpToBreakpoint);
            MirrorDebugLog = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("转发日志到Unity日志窗口", "转发资源编辑器日志到Unity日志窗口"), MirrorDebugLog);
            EnableLogging = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("打开日志记录", "打开事件、状态变化的日志记录. 被禁用时可以提高性能."), EnableLogging);
            EnableDebugFlow = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("打开流程调试", "在流程调试模式下打开记录变量和其他状态信息。这是一个全局设置。如果打开, 你仍然可以在不同的状态机进行独立设置。禁用可以提高性能。"), EnableDebugFlow);
            DebugLookAtColor = EditorGUILayout.ColorField("调试颜色", DebugLookAtColor, new GUILayoutOption[0]);
            DebugRaycastColor = EditorGUILayout.ColorField("调试拾取颜色", DebugRaycastColor, new GUILayoutOption[0]);
        }

        private static void DoErrorCheckSettings()
        {
            bool changed = GUI.changed;
            EnableRealtimeErrorChecker = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("打开实时错误检查", "如果大型工程降低了启动速度，你可以禁用实时错误检查，并使用人工刷新按钮进行刷新."), EnableRealtimeErrorChecker);
            DisableErrorCheckerWhenPlaying = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("当运行时关闭错误检查", "禁用运行时错误检查可以提高回放性能."), DisableErrorCheckerWhenPlaying);
            CheckForRequiredComponent = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查所需组件", "激活/禁用所需组件检查. 如果你需要在运行时添加组件这个将会非常有用."), CheckForRequiredComponent);
            CheckForRequiredField = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查所需动作字段", "激活/禁用所需动作字段检查. 动作正常执行需要填写特定字段."), CheckForRequiredField);
            CheckForEventNotUsed = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查没有被使用的事件", "激活/禁用检查没有被使用的事件. 例如, 检查动作发送的消息."), CheckForEventNotUsed);
            CheckForTransitionMissingEvent = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查转换遗漏的事件", "激活/禁用检查转换遗漏的事件"), CheckForTransitionMissingEvent);
            CheckForTransitionMissingTarget = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查转换遗漏的目标", "激活/禁用检查转换遗漏的目标."), CheckForTransitionMissingTarget);
            CheckForDuplicateTransitionEvent = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查重复转换的事件", "激活/禁用检查重复转换的事件."), CheckForDuplicateTransitionEvent);
            CheckForMouseEventErrors = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查鼠标事件设置错误", "激活/禁用检查鼠标事件设置错误."), CheckForMouseEventErrors);
            CheckForCollisionEventErrors = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查碰撞事件设置错误", "激活/禁用检查碰撞事件设置错误."), CheckForCollisionEventErrors);
            CheckForPrefabRestrictions = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查预制件限制", "激活/禁用检查预制件限制."), CheckForPrefabRestrictions);
            CheckForObsoleteActions = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("检查过期动作", "激活/禁用检查过期动作."), CheckForObsoleteActions);
            if (GUI.changed)
            {
                FsmErrorChecker.Refresh();
                FsmEditor.RepaintAll();
            }
            else
            {
                GUI.changed = changed;
            }
        }

        private static void DoGeneralSettings()
        {
            ShowHints = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("在编辑器中显示提示盒", "如果你在学习使用资源编辑器显示提示盒将会非常有用. 通过F1打开或关闭."), ShowHints);
            AutoAddTrainResGUI = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("自动添加TrainResGUI到场景中", "当你选择或添加一个状态机时自动添加TrainResGUI到场景中. 注意, 如果你想看见标识、OnGUI动作和iTween路径编辑，则需要添加一个TrainResGUI到场景中."), AutoAddTrainResGUI);
            DisableEditorWhenPlaying = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("当运行时禁用资源编辑器", "如果你发现在编辑器中运行性能较低，你就可以禁用资源编辑器以提高性能."), DisableEditorWhenPlaying);
            DisableInspectorWhenPlaying = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("当运行时禁用观察器面板", "禁用观察器面板以提高性能."), DisableInspectorWhenPlaying);
            DisableToolWindowsWhenPlaying = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("当运行时禁用工具窗口", "你可以禁用工具窗口当你发现在编辑器中运行缓慢时. 注意, 一些工具窗口可以在设置窗口中独立激活或禁用."), DisableToolWindowsWhenPlaying);
            bool flag = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("在场景视图中显示标识", "在场景视图中显示标识."), DrawTrainResGizmos);
            if (flag != DrawTrainResGizmos)
            {
                DrawTrainResGizmos = flag;
                TrainResFSMCore.DrawGizmos = flag;
                GUI.changed = true;
            }
            flag = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("在对象层次视图中显示标识", "在对象层次视图中显示状态机标识."), DrawTrainResGizmoInHierarchy);
            if (flag != DrawTrainResGizmoInHierarchy)
            {
                DrawTrainResGizmoInHierarchy = flag;
                EditorApplication.RepaintHierarchyWindow();
            }
            EditorApplication.RepaintHierarchyWindow();
            AutoSelectGameObject = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("状态机选定时同时选定所在游戏对象", "状态机选定时同时选定所在游戏对象."), AutoSelectGameObject);
            SelectStateOnActivated = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("选定激活状态", "是否自动选定激活状态. 选定状态在观察器中可见."), SelectStateOnActivated);
            SelectFSMInGameView = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("在游戏视图中选定带状态机的游戏对象", "运行时，通过点击可以选定带状态机的游戏对象. 注意: 只对带碰撞的游戏对象有效."), SelectFSMInGameView);
            ShowEditWhileRunningWarning = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("显示模态运行警告", "当运行时你如果修改状态机第一次将会出现模态警告. 一个礼貌的提醒!"), ShowEditWhileRunningWarning);
            CloseActionBrowserOnEnter = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("添加完动作后关闭动作浏览器", "添加完动作后关闭动作浏览器."), CloseActionBrowserOnEnter);
            DimUnusedActionParameters = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("没使用的动作参数显示暗淡", "在动作编辑器中没使用的动作参数显示暗淡. 能帮助减少可视化杂乱."), DimUnusedActionParameters);
            LoadAllPrefabs = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("加载所有TrainResFSM预制件.", "当重命名事件和变量时加载所有TrainResFSM预制件."), LoadAllPrefabs);
            AutoLoadPrefabs = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("自动加载场景中的预制件", "自动加载场景中的预制件."), AutoLoadPrefabs);
            AddPrefabLabel = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("添加预制件标签", "添加标签到预制件."), AddPrefabLabel);
        }

        private static void DoGraphViewSettings()
        {
            TriangleGames.TrainResEditor.FsmEditorStyles.ColorScheme scheme = (TriangleGames.TrainResEditor.FsmEditorStyles.ColorScheme) EditorGUILayout.EnumPopup(new GUIContent("Color Scheme", "Default pickes a color scheme that matched Pro/Indie skins."), ColorScheme, new GUILayoutOption[0]);
            if (scheme != ColorScheme)
            {
                ColorScheme = scheme;
                FsmEditorStyles.Init();
            }
            GraphViewLinkStyle = (TriangleGames.TrainResEditor.GraphViewLinkStyle) EditorGUILayout.EnumPopup(new GUIContent("链接风格", "各种链接风格..."), GraphViewLinkStyle, new GUILayoutOption[0]);
            NewStateName = EditorGUILayout.TextField(new GUIContent("新状态名称", "新状态的缺省名称. 注意: 每个状态机内状态名称必须唯一. 自动命名状态会在状态名称后面附加数字."), NewStateName, new GUILayoutOption[0]);
            int num = EditorGUILayout.IntField(new GUIContent("最大状态宽度", "状态盒的最大宽度. 缺省值是200."), StateMaxWidth, new GUILayoutOption[0]);
            if (num != StateMaxWidth)
            {
                StateMaxWidth = num;
                FsmBuilder.UpdateAllStateSizes();
            }
            SnapGridSize = EditorGUILayout.IntField(new GUIContent("对齐网格大小", "按下Ctrl键时对齐网格的大小."), SnapGridSize, new GUILayoutOption[0]);
            EdgeScrollSpeed = EditorGUILayout.FloatField(new GUIContent("边缘滚动速度", "设置状态/转换在图形视图边缘拖放时的滚动速度. 缺省值是10, 值越小越慢."), EdgeScrollSpeed, new GUILayoutOption[0]);
            FrameSelectedState = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("自动帧选择状态", "在图形视图中是否自动帧选择状态."), FrameSelectedState);
            bool flag = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("显示图形视图中的注释", "在图形视图中显示添加到状态机或状态上的描述"), ShowCommentsInGraphView);
            if (flag != ShowCommentsInGraphView)
            {
                ShowCommentsInGraphView = flag;
                FsmBuilder.UpdateAllStateSizes();
                GUI.changed = true;
            }
            ColorLinks = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("链接颜色", "状态与状态间的链接线颜色."), ColorLinks);
            ShowScrollBars = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("总是显示滚动条", "当被禁用时, 滚动条只在你拖放画布时显示. 注意: 使用鼠标中键拖拽画布."), ShowScrollBars);
            EnableWatermarks = FsmEditorGUILayout.RightAlignedToggle(new GUIContent("激活水印", "显示大标题和背景水印. 注意: 如果编辑器性能下降时请关闭此选项."), EnableWatermarks);
            ScreenshotsPath = EditorGUILayout.TextField(new GUIContent("状态机截图存放目录", "状态机截图存放目录. 相对于工程的根目录. 注意: 不推荐在Assets目录下, 因为Unity会当做是工程的资源."), ScreenshotsPath, new GUILayoutOption[0]);
        }

        public static void LoadSettings()
        {
            ScreenshotsPath = EditorPrefs.GetString("TrainRes.ScreenshotsPath", "TrainRes/Screenshots");
            DebugVariables = EditorPrefs.GetBool("TrainRes.DebugVariables", false);
            ConsoleActionReportSortOptionIndex = EditorPrefs.GetInt("TrainRes.ConsoleActionReportSortOptionIndex", 1);
            LogPauseOnSelect = EditorPrefs.GetBool("TrainRes.LogPauseOnSelect", true);
            LogCollapseSystemEvents = EditorPrefs.GetBool("TrainRes.LogCollapseSystemEvents", true);
            LogHideUnusedEvents = EditorPrefs.GetBool("TrainRes.LogHideUnusedEvents", true);
            LogShowSentBy = EditorPrefs.GetBool("TrainRes.LogShowSentBy", true);
            ShowHints = EditorPrefs.GetBool("TrainRes.ShowHints", true);
            CloseActionBrowserOnEnter = EditorPrefs.GetBool("TrainRes.CloseActionBrowserOnEnter", false);
            DisableEditorWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableEditorWhenPlaying", false);
            DisableInspectorWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableInspectorWhenPlaying", false);
            DisableToolWindowsWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableToolWindowsWhenPlaying", true);
            DisableActionBrowerWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableActionBrowerWhenPlaying", false);
            DisableEventBrowserWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableEventBrowserWhenPlaying", false);
            ColorScheme = (TriangleGames.TrainResEditor.FsmEditorStyles.ColorScheme) EditorPrefs.GetInt("TrainRes.ColorScheme", 0);
            EnableRealtimeErrorChecker = EditorPrefs.GetBool("TrainRes.EnableRealtimeErrorChecker", true);
            CheckForRequiredComponent = EditorPrefs.GetBool("TrainRes.CheckForRequiredComponent", true);
            CheckForRequiredField = EditorPrefs.GetBool("TrainRes.CheckForRequiredField", true);
            CheckForEventNotUsed = EditorPrefs.GetBool("TrainRes.CheckForEventNotUsed", true);
            CheckForTransitionMissingEvent = EditorPrefs.GetBool("TrainRes.CheckForTransitionMissingEvent", true);
            CheckForTransitionMissingTarget = EditorPrefs.GetBool("TrainRes.CheckForTransitionMissingTarget", true);
            CheckForDuplicateTransitionEvent = EditorPrefs.GetBool("TrainRes.CheckForDuplicateTransitionEvent", true);
            CheckForMouseEventErrors = EditorPrefs.GetBool("TrainRes.CheckForMouseEventErrors", true);
            CheckForCollisionEventErrors = EditorPrefs.GetBool("TrainRes.CheckForCollisionEventErrors", true);
            CheckForPrefabRestrictions = EditorPrefs.GetBool("TrainRes.CheckForPrefabRestrictions", true);
            CheckForObsoleteActions = EditorPrefs.GetBool("TrainRes.CheckForObsoleteActions", true);
            ExpandDebuggingSettings = EditorPrefs.GetBool("TrainRes.ExpandDebuggingSettings", false);
            ExpandErrorCheckSettings = EditorPrefs.GetBool("TrainRes.ExpandErrorCheckSettings", false);
            ExpandGeneralSettings = EditorPrefs.GetBool("TrainRes.ExpandFsmSettings", false);
            ExpandGraphViewSettings = EditorPrefs.GetBool("TrainRes.ExpandGraphViewSettings", false);
            EdgeScrollZone = EditorPrefs.GetFloat("TrainRes.AutoPanZone", 100f);
            EdgeScrollSpeed = EditorPrefs.GetFloat("TrainRes.AutoPanSpeed", 5f);
            HideObsoleteActions = EditorPrefs.GetBool("TrainRes.HideObsoleteActions", true);
            ColorLinks = EditorPrefs.GetBool("TrainRes.ColorLinks", false);
            DisableErrorCheckerWhenPlaying = EditorPrefs.GetBool("TrainRes.DisableErrorCheckerWhenPlaying", true);
            EnableLogging = EditorPrefs.GetBool("TrainRes.EnableLogging", true);
            SnapGridSize = EditorPrefs.GetInt("TrainRes.SnapGridSize", 0x10);
            ShowScrollBars = EditorPrefs.GetBool("TrainRes.ShowScrollBars", true);
            EnableWatermarks = EditorPrefs.GetBool("TrainRes.ShowWatermark", true);
            StateMaxWidth = EditorPrefs.GetInt("TrainRes.StateMaxWidth", 200);
            AddPrefabLabel = EditorPrefs.GetBool("TrainRes.AddPrefabLabel", true);
            AutoLoadPrefabs = EditorPrefs.GetBool("TrainRes.AutoLoadPrefabs", true);
            LoadAllPrefabs = EditorPrefs.GetBool("TrainRes.LoadAllPrefabs", true);
            UnloadPrefabs = EditorPrefs.GetBool("TrainRes.UnloadPrefabs", true);
            StartStateName = EditorPrefs.GetString("TrainRes.StartStateName", "状态 1");
            NewStateName = EditorPrefs.GetString("TrainRes.NewStateName", "状态");
            AutoSelectGameObject = EditorPrefs.GetBool("TrainRes.AutoSelectGameObject", true);
            SelectStateOnActivated = EditorPrefs.GetBool("TrainRes.SelectStateOnActivated", true);
            JumpToBreakpoint = EditorPrefs.GetBool("TrainRes.GotoBreakpoint", true);
            GameStateIconSize = EditorPrefs.GetInt("TrainRes.GameStateIconSize", 0x20);
            FrameSelectedState = EditorPrefs.GetBool("TrainRes.FrameSelectedState", false);
            SyncLogSelection = EditorPrefs.GetBool("TrainRes.SyncLogSelection", true);
            BreakpointsEnabled = EditorPrefs.GetBool("TrainRes.BreakpointsEnabled", true);
            MirrorDebugLog = EditorPrefs.GetBool("TrainRes.MirrorDebugLog", false);
            LockGraphView = EditorPrefs.GetBool("TrainRes.LockGraphView", false);
            GraphViewLinkStyle = (TriangleGames.TrainResEditor.GraphViewLinkStyle) EditorPrefs.GetInt("TrainRes.GraphLinkStyle", 0);
            KeepActionBrowserOpen = true;
            ShowCommentsInGraphView = EditorPrefs.GetBool("TrainRes.ShowCommentsInGraphView", true);
            ShowStateLabelsInGameView = EditorPrefs.GetBool("TrainRes.ShowStateLabelsInGameView", true);
            DrawTrainResGizmos = EditorPrefs.GetBool("TrainRes.DrawTrainResGizmos", true);
            DrawTrainResGizmoInHierarchy = EditorPrefs.GetBool("TrainRes.DrawTrainResGizmoInHierarchy", true);
            ShowEditWhileRunningWarning = EditorPrefs.GetBool("TrainRes.ShowEditWhileRunningWarning", true);
            MaxReEnterStateCount = EditorPrefs.GetInt("TrainRes.MaxReenterStateCount", 100);
            ShowStateDescription = EditorPrefs.GetBool("TrainRes.ShowStateDescription", true);
            ShowActionParameters = EditorPrefs.GetBool("TrainRes.ShowActionParameters", true);
            DebugActionParameters = EditorPrefs.GetBool("TrainRes.DebugActionParameters", false);
            HideUnusedEvents = EditorPrefs.GetBool("TrainRes.HideUnusedEvents", false);
            ShowActionPreview = EditorPrefs.GetBool("TrainRes.ShowActionPreview", true);
            SelectedActionCategory = EditorPrefs.GetInt("TrainRes.SelectedActionCategory", 0);
            SelectFSMInGameView = EditorPrefs.GetBool("TrainRes.SelectFSMInGameView", true);
            DebugLookAtColor = FsmEditorUtility.UnpackColorFromInt(EditorPrefs.GetInt("TrainRes.DebugLookAtColor", FsmEditorUtility.PackColorIntoInt(Color.gray)));
            DebugRaycastColor = FsmEditorUtility.UnpackColorFromInt(EditorPrefs.GetInt("TrainRes.DebugRaycastColor", FsmEditorUtility.PackColorIntoInt(Color.gray)));
            HideUnusedParams = EditorPrefs.GetBool("TrainRes.HideUnusedParams", false);
            AutoAddTrainResGUI = EditorPrefs.GetBool("TrainRes.AutoAddTrainResGUI", true);
            DimUnusedActionParameters = EditorPrefs.GetBool("TrainRes.DimUnusedParameters", false);
            SelectNewVariables = EditorPrefs.GetBool("TrainRes.SelectNewVariables", true);
            FsmBrowserShowFullPath = EditorPrefs.GetBool("TrainRes.FsmBrowserShowFullPath", true);
            EnableDebugFlow = EditorPrefs.GetBool("TrainRes.EnableDebugFlow", true);
            ValidateSettings();
            ApplySettings();
        }

        public static void OnGUI()
        {
            scrollPosition = GUILayout.BeginScrollView(scrollPosition, new GUILayoutOption[0]);
            EditorGUIUtility.LookLikeControls(180f, 120f);
            bool changed = GUI.changed;
            GUI.changed = false;
            GUILayout.Label("设置", EditorStyles.boldLabel, new GUILayoutOption[0]);
            ExpandGeneralSettings = FsmEditorGUILayout.BoldFoldout(ExpandGeneralSettings, new GUIContent("通用"));
            if (ExpandGeneralSettings)
            {
                DoGeneralSettings();
            }
            ExpandGraphViewSettings = FsmEditorGUILayout.BoldFoldout(ExpandGraphViewSettings, new GUIContent("图形视图"));
            if (ExpandGraphViewSettings)
            {
                DoGraphViewSettings();
            }
            ExpandDebuggingSettings = FsmEditorGUILayout.BoldFoldout(ExpandDebuggingSettings, new GUIContent("调试"));
            if (ExpandDebuggingSettings)
            {
                DoDebuggingSettings();
            }
            ExpandErrorCheckSettings = FsmEditorGUILayout.BoldFoldout(ExpandErrorCheckSettings, new GUIContent("错误检查"));
            if (ExpandErrorCheckSettings)
            {
                DoErrorCheckSettings();
            }
            if (GUI.changed)
            {
                ValidateSettings();
                ApplySettings();
                SaveSettings();
            }
            else
            {
                GUI.changed = changed;
            }
            GUILayout.EndScrollView();
            FsmEditorGUILayout.Divider(new GUILayoutOption[0]);
            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (GUILayout.Button("恢复缺省设置", new GUILayoutOption[0]))
            {
                ResetDefaults();
            }
            if (FsmEditorGUILayout.HelpButton("在线帮助"))
            {
                EditorCommands.OpenWikiPage(WikiPages.Preferences);
            }
            GUILayout.EndHorizontal();
            EditorGUILayout.Space();
        }

        private static void ResetDefaults()
        {
            GraphViewLinkStyle = TriangleGames.TrainResEditor.GraphViewLinkStyle.BezierLinks;
            NewStateName = "State";
            MaxReEnterStateCount = 100;
            AutoSelectGameObject = true;
            SelectStateOnActivated = true;
            JumpToBreakpoint = true;
            MirrorDebugLog = false;
            ShowEditWhileRunningWarning = true;
            SelectFSMInGameView = true;
            ShowCommentsInGraphView = true;
            DrawTrainResGizmos = true;
            DrawTrainResGizmoInHierarchy = true;
            AutoAddTrainResGUI = true;
            DimUnusedActionParameters = false;
            DebugLookAtColor = Color.grey;
            DebugRaycastColor = Color.grey;
            ShowHints = true;
            CloseActionBrowserOnEnter = false;
            SelectNewVariables = true;
            AddPrefabLabel = true;
            LoadAllPrefabs = true;
            AutoLoadPrefabs = true;
            UnloadPrefabs = true;
            StateMaxWidth = 200;
            ShowScrollBars = true;
            EnableWatermarks = true;
            ColorLinks = false;
            SnapGridSize = 0x10;
            EnableLogging = true;
            HideUnusedEvents = false;
            EdgeScrollSpeed = 5f;
            EdgeScrollZone = 100f;
            EnableRealtimeErrorChecker = true;
            DisableErrorCheckerWhenPlaying = true;
            CheckForRequiredComponent = true;
            CheckForRequiredField = true;
            CheckForEventNotUsed = true;
            CheckForTransitionMissingEvent = true;
            CheckForTransitionMissingTarget = true;
            CheckForDuplicateTransitionEvent = true;
            CheckForMouseEventErrors = true;
            CheckForCollisionEventErrors = true;
            CheckForPrefabRestrictions = true;
            CheckForObsoleteActions = true;
            DisableEditorWhenPlaying = false;
            DisableInspectorWhenPlaying = false;
            DisableToolWindowsWhenPlaying = true;
            DisableActionBrowerWhenPlaying = false;
            DisableEventBrowserWhenPlaying = false;
            ScreenshotsPath = "TrainRes/Screenshots/";
            EnableDebugFlow = true;
            ApplySettings();
            SaveSettings();
        }

        public static void SaveSettings()
        {
            ValidateSettings();
            EditorPrefs.SetString("TrainRes.ScreenshotsPath", ScreenshotsPath);
            EditorPrefs.SetString("TrainRes.StartStateName", StartStateName);
            EditorPrefs.SetString("TrainRes.NewStateName", NewStateName);
            EditorPrefs.SetBool("TrainRes.AutoSelectGameObject", AutoSelectGameObject);
            EditorPrefs.SetBool("TrainRes.SelectStateOnActivated", SelectStateOnActivated);
            EditorPrefs.SetBool("TrainRes.GotoBreakpoint", JumpToBreakpoint);
            EditorPrefs.SetInt("TrainRes.GameStateIconSize", GameStateIconSize);
            EditorPrefs.SetBool("TrainRes.FrameSelectedState", FrameSelectedState);
            EditorPrefs.SetBool("TrainRes.SyncLogSelection", SyncLogSelection);
            EditorPrefs.SetBool("TrainRes.BreakpointsEnabled", BreakpointsEnabled);
            EditorPrefs.SetBool("TrainRes.MirrorDebugLog", MirrorDebugLog);
            EditorPrefs.SetBool("TrainRes.LockGraphView", LockGraphView);
            EditorPrefs.SetInt("TrainRes.GraphLinkStyle", (int) GraphViewLinkStyle);
            EditorPrefs.SetBool("TrainRes.KeepActionBrowserOpen", KeepActionBrowserOpen);
            EditorPrefs.SetBool("TrainRes.ShowCommentsInGraphView", ShowCommentsInGraphView);
            EditorPrefs.SetBool("TrainRes.ShowStateLabelsInGameView", ShowStateLabelsInGameView);
            EditorPrefs.SetBool("TrainRes.ShowStateDescription", ShowStateDescription);
            EditorPrefs.SetBool("TrainRes.ShowActionParameters", ShowActionParameters);
            EditorPrefs.SetBool("TrainRes.DebugActionParameters", DebugActionParameters);
            EditorPrefs.SetBool("TrainRes.DrawTrainResGizmos", DrawTrainResGizmos);
            EditorPrefs.SetBool("TrainRes.DrawTrainResGizmoInHierarchy", DrawTrainResGizmoInHierarchy);
            EditorPrefs.SetBool("TrainRes.ShowEditWhileRunningWarning", ShowEditWhileRunningWarning);
            EditorPrefs.SetInt("TrainRes.MaxReenterStateCount", MaxReEnterStateCount);
            EditorPrefs.SetBool("TrainRes.HideUnusedEvents", HideUnusedEvents);
            EditorPrefs.SetBool("TrainRes.ShowActionPreview", ShowActionPreview);
            EditorPrefs.SetInt("TrainRes.SelectedActionCategory", SelectedActionCategory);
            EditorPrefs.SetBool("TrainRes.SelectFSMInGameView", SelectFSMInGameView);
            EditorPrefs.SetInt("TrainRes.DebugLookAtColor", FsmEditorUtility.PackColorIntoInt(DebugLookAtColor));
            EditorPrefs.SetInt("TrainRes.DebugRaycastColor", FsmEditorUtility.PackColorIntoInt(DebugRaycastColor));
            EditorPrefs.SetBool("TrainRes.HideUnusedParams", HideUnusedParams);
            EditorPrefs.SetBool("TrainRes.EnableRealtimeErrorChecker", EnableRealtimeErrorChecker);
            EditorPrefs.SetBool("TrainRes.AutoAddTrainResGUI", AutoAddTrainResGUI);
            EditorPrefs.SetBool("TrainRes.DimUnusedParameters", DimUnusedActionParameters);
            EditorPrefs.SetBool("TrainRes.AddPrefabLabel", AddPrefabLabel);
            EditorPrefs.SetBool("TrainRes.AutoLoadPrefabs", AutoLoadPrefabs);
            EditorPrefs.SetBool("TrainRes.LoadAllPrefabs", LoadAllPrefabs);
            EditorPrefs.SetBool("TrainRes.UnloadPrefabs", UnloadPrefabs);
            EditorPrefs.SetInt("TrainRes.StateMaxWidth", StateMaxWidth);
            EditorPrefs.SetBool("TrainRes.ShowScrollBars", ShowScrollBars);
            EditorPrefs.SetBool("TrainRes.ShowWatermark", EnableWatermarks);
            EditorPrefs.SetInt("TrainRes.SnapGridSize", SnapGridSize);
            EditorPrefs.SetBool("TrainRes.EnableLogging", EnableLogging);
            EditorPrefs.SetBool("TrainRes.DisableErrorCheckerWhenPlaying", DisableErrorCheckerWhenPlaying);
            EditorPrefs.SetBool("TrainRes.ColorLinks", ColorLinks);
            EditorPrefs.SetBool("TrainRes.HideObsoleteActions", HideObsoleteActions);
            EditorPrefs.SetFloat("TrainRes.AutoPanSpeed", EdgeScrollSpeed);
            EditorPrefs.SetFloat("TrainRes.AutoPanZone", EdgeScrollZone);
            EditorPrefs.SetBool("TrainRes.ExpandDebuggingSettings", ExpandDebuggingSettings);
            EditorPrefs.SetBool("TrainRes.ExpandErrorCheckSettings", ExpandErrorCheckSettings);
            EditorPrefs.SetBool("TrainRes.ExpandFsmSettings", ExpandGeneralSettings);
            EditorPrefs.SetBool("TrainRes.ExpandGraphViewSettings", ExpandGraphViewSettings);
            EditorPrefs.SetBool("TrainRes.CheckForRequiredComponent", CheckForRequiredComponent);
            EditorPrefs.SetBool("TrainRes.CheckForRequiredField", CheckForRequiredField);
            EditorPrefs.SetBool("TrainRes.CheckForTransitionMissingEvent", CheckForTransitionMissingEvent);
            EditorPrefs.SetBool("TrainRes.CheckForTransitionMissingTarget", CheckForTransitionMissingTarget);
            EditorPrefs.SetBool("TrainRes.CheckForDuplicateTransitionEvent", CheckForDuplicateTransitionEvent);
            EditorPrefs.SetBool("TrainRes.CheckForMouseEventErrors", CheckForMouseEventErrors);
            EditorPrefs.SetBool("TrainRes.CheckForCollisionEventErrors", CheckForCollisionEventErrors);
            EditorPrefs.SetBool("TrainRes.CheckForEventNotUsed", CheckForEventNotUsed);
            EditorPrefs.SetBool("TrainRes.CheckForPrefabRestrictions", CheckForPrefabRestrictions);
            EditorPrefs.SetBool("TrainRes.CheckForObsoleteActions", CheckForObsoleteActions);
            EditorPrefs.SetInt("TrainRes.ColorScheme", (int) ColorScheme);
            EditorPrefs.SetBool("TrainRes.DisableEditorWhenPlaying", DisableEditorWhenPlaying);
            EditorPrefs.SetBool("TrainRes.DisableInspectorWhenPlaying", DisableInspectorWhenPlaying);
            EditorPrefs.SetBool("TrainRes.DisableToolWindowsWhenPlaying", DisableToolWindowsWhenPlaying);
            EditorPrefs.SetBool("TrainRes.DisableActionBrowerWhenPlaying", DisableActionBrowerWhenPlaying);
            EditorPrefs.SetBool("TrainRes.DisableEventBrowserWhenPlaying", DisableEventBrowserWhenPlaying);
            EditorPrefs.SetBool("TrainRes.ShowHints", ShowHints);
            EditorPrefs.SetBool("TrainRes.CloseActionBrowserOnEnter", CloseActionBrowserOnEnter);
            EditorPrefs.SetBool("TrainRes.LogPauseOnSelect", LogPauseOnSelect);
            EditorPrefs.SetBool("TrainRes.LogHideUnusedEvents", LogHideUnusedEvents);
            EditorPrefs.SetBool("TrainRes.LogShowSentBy", LogShowSentBy);
            EditorPrefs.SetBool("TrainRes.LogCollapseSystemEvents", LogCollapseSystemEvents);
            EditorPrefs.SetBool("TrainRes.EnableDebugFlow", EnableDebugFlow);
            EditorPrefs.SetInt("TrainRes.ConsoleActionReportSortOptionIndex", ConsoleActionReportSortOptionIndex);
            EditorPrefs.SetBool("TrainRes.DebugVariables", DebugVariables);
            EditorPrefs.SetBool("TrainRes.SelectNewVariables", SelectNewVariables);
            EditorPrefs.SetBool("TrainRes.FsmBrowserShowFullPath", FsmBrowserShowFullPath);
            FsmEditor.Repaint(true);
        }

        private static void ValidateSettings()
        {
            EdgeScrollSpeed = Mathf.Clamp(EdgeScrollSpeed, 1f, 20f);
            MaxReEnterStateCount = Mathf.Max(100, MaxReEnterStateCount);
        }

        public static bool AddPrefabLabel
        {
            [CompilerGenerated]
            get
            {
                return AddPrefabLabel__BackingField;
            }
            [CompilerGenerated]
            set
            {
                AddPrefabLabel__BackingField = value;
            }
        }

        public static bool AutoAddTrainResGUI
        {
            [CompilerGenerated]
            get
            {
                return AutoAddTrainResGUI__BackingField;
            }
            [CompilerGenerated]
            set
            {
                AutoAddTrainResGUI__BackingField = value;
            }
        }

        public static bool AutoLoadPrefabs
        {
            [CompilerGenerated]
            get
            {
                return AutoLoadPrefabs__BackingField;
            }
            [CompilerGenerated]
            set
            {
                AutoLoadPrefabs__BackingField = value;
            }
        }

        public static bool AutoSelectGameObject
        {
            [CompilerGenerated]
            get
            {
                return AutoSelectGameObject__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                AutoSelectGameObject__BackingField = value;
            }
        }

        public static bool BreakpointsEnabled
        {
            [CompilerGenerated]
            get
            {
                return BreakpointsEnabled__BackingField;
            }
            [CompilerGenerated]
            set
            {
                BreakpointsEnabled__BackingField = value;
            }
        }

        public static bool CheckForCollisionEventErrors
        {
            [CompilerGenerated]
            get
            {
                return CheckForCollisionEventErrors__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForCollisionEventErrors__BackingField = value;
            }
        }

        public static bool CheckForDuplicateTransitionEvent
        {
            [CompilerGenerated]
            get
            {
                return CheckForDuplicateTransitionEvent__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForDuplicateTransitionEvent__BackingField = value;
            }
        }

        public static bool CheckForEventNotUsed
        {
            [CompilerGenerated]
            get
            {
                return CheckForEventNotUsed__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForEventNotUsed__BackingField = value;
            }
        }

        public static bool CheckForMouseEventErrors
        {
            [CompilerGenerated]
            get
            {
                return CheckForMouseEventErrors__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForMouseEventErrors__BackingField = value;
            }
        }

        public static bool CheckForObsoleteActions
        {
            [CompilerGenerated]
            get
            {
                return CheckForObsoleteActions__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForObsoleteActions__BackingField = value;
            }
        }

        public static bool CheckForPrefabRestrictions
        {
            [CompilerGenerated]
            get
            {
                return CheckForPrefabRestrictions__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForPrefabRestrictions__BackingField = value;
            }
        }

        public static bool CheckForRequiredComponent
        {
            [CompilerGenerated]
            get
            {
                return CheckForRequiredComponent__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForRequiredComponent__BackingField = value;
            }
        }

        public static bool CheckForRequiredField
        {
            [CompilerGenerated]
            get
            {
                return CheckForRequiredField__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForRequiredField__BackingField = value;
            }
        }

        public static bool CheckForTransitionMissingEvent
        {
            [CompilerGenerated]
            get
            {
                return CheckForTransitionMissingEvent__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForTransitionMissingEvent__BackingField = value;
            }
        }

        public static bool CheckForTransitionMissingTarget
        {
            [CompilerGenerated]
            get
            {
                return CheckForTransitionMissingTarget__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CheckForTransitionMissingTarget__BackingField = value;
            }
        }

        public static bool CloseActionBrowserOnEnter
        {
            [CompilerGenerated]
            get
            {
                return CloseActionBrowserOnEnter__BackingField;
            }
            [CompilerGenerated]
            set
            {
                CloseActionBrowserOnEnter__BackingField = value;
            }
        }

        public static bool ColorLinks
        {
            [CompilerGenerated]
            get
            {
                return ColorLinks__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ColorLinks__BackingField = value;
            }
        }

        public static TriangleGames.TrainResEditor.FsmEditorStyles.ColorScheme ColorScheme
        {
            [CompilerGenerated]
            get
            {
                return ColorScheme__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ColorScheme__BackingField = value;
            }
        }

        public static int ConsoleActionReportSortOptionIndex
        {
            [CompilerGenerated]
            get
            {
                return ConsoleActionReportSortOptionIndex__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ConsoleActionReportSortOptionIndex__BackingField = value;
            }
        }

        public static bool DebugActionParameters
        {
            [CompilerGenerated]
            get
            {
                return DebugActionParameters__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DebugActionParameters__BackingField = value;
            }
        }

        public static Color DebugLookAtColor
        {
            [CompilerGenerated]
            get
            {
                return DebugLookAtColor__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DebugLookAtColor__BackingField = value;
            }
        }

        public static Color DebugRaycastColor
        {
            [CompilerGenerated]
            get
            {
                return DebugRaycastColor__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DebugRaycastColor__BackingField = value;
            }
        }

        public static bool DebugVariables
        {
            [CompilerGenerated]
            get
            {
                return DebugVariables__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DebugVariables__BackingField = value;
            }
        }

        public static bool DimUnusedActionParameters
        {
            [CompilerGenerated]
            get
            {
                return DimUnusedActionParameters__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DimUnusedActionParameters__BackingField = value;
            }
        }

        public static bool DisableActionBrowerWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableActionBrowerWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableActionBrowerWhenPlaying__BackingField = value;
            }
        }

        public static bool DisableEditorWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableEditorWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableEditorWhenPlaying__BackingField = value;
            }
        }

        public static bool DisableErrorCheckerWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableErrorCheckerWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableErrorCheckerWhenPlaying__BackingField = value;
            }
        }

        public static bool DisableEventBrowserWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableEventBrowserWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableEventBrowserWhenPlaying__BackingField = value;
            }
        }

        public static bool DisableInspectorWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableInspectorWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableInspectorWhenPlaying__BackingField = value;
            }
        }

        public static bool DisableToolWindowsWhenPlaying
        {
            [CompilerGenerated]
            get
            {
                return DisableToolWindowsWhenPlaying__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DisableToolWindowsWhenPlaying__BackingField = value;
            }
        }

        public static bool DrawTrainResGizmoInHierarchy
        {
            [CompilerGenerated]
            get
            {
                return DrawTrainResGizmoInHierarchy__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DrawTrainResGizmoInHierarchy__BackingField = value;
            }
        }

        public static bool DrawTrainResGizmos
        {
            [CompilerGenerated]
            get
            {
                return DrawTrainResGizmos__BackingField;
            }
            [CompilerGenerated]
            set
            {
                DrawTrainResGizmos__BackingField = value;
            }
        }

        public static float EdgeScrollSpeed
        {
            [CompilerGenerated]
            get
            {
                return EdgeScrollSpeed__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EdgeScrollSpeed__BackingField = value;
            }
        }

        public static float EdgeScrollZone
        {
            [CompilerGenerated]
            get
            {
                return EdgeScrollZone__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EdgeScrollZone__BackingField = value;
            }
        }

        public static bool EnableDebugFlow
        {
            [CompilerGenerated]
            get
            {
                return EnableDebugFlow__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EnableDebugFlow__BackingField = value;
            }
        }

        public static bool EnableLogging
        {
            [CompilerGenerated]
            get
            {
                return EnableLogging__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EnableLogging__BackingField = value;
            }
        }

        public static bool EnableRealtimeErrorChecker
        {
            [CompilerGenerated]
            get
            {
                return EnableRealtimeErrorChecker__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EnableRealtimeErrorChecker__BackingField = value;
            }
        }

        public static bool EnableWatermarks
        {
            [CompilerGenerated]
            get
            {
                return EnableWatermarks__BackingField;
            }
            [CompilerGenerated]
            set
            {
                EnableWatermarks__BackingField = value;
            }
        }

        private static bool ExpandDebuggingSettings
        {
            [CompilerGenerated]
            get
            {
                return ExpandDebuggingSettings__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ExpandDebuggingSettings__BackingField = value;
            }
        }

        private static bool ExpandErrorCheckSettings
        {
            [CompilerGenerated]
            get
            {
                return ExpandErrorCheckSettings__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ExpandErrorCheckSettings__BackingField = value;
            }
        }

        private static bool ExpandGeneralSettings
        {
            [CompilerGenerated]
            get
            {
                return ExpandGeneralSettings__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ExpandGeneralSettings__BackingField = value;
            }
        }

        private static bool ExpandGraphViewSettings
        {
            [CompilerGenerated]
            get
            {
                return ExpandGraphViewSettings__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ExpandGraphViewSettings__BackingField = value;
            }
        }

        public static bool FrameSelectedState
        {
            [CompilerGenerated]
            get
            {
                return FrameSelectedState__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                FrameSelectedState__BackingField = value;
            }
        }

        public static bool FsmBrowserShowFullPath
        {
            [CompilerGenerated]
            get
            {
                return FsmBrowserShowFullPath__BackingField;
            }
            [CompilerGenerated]
            set
            {
                FsmBrowserShowFullPath__BackingField = value;
            }
        }

        public static int GameStateIconSize
        {
            [CompilerGenerated]
            get
            {
                return GameStateIconSize__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                GameStateIconSize__BackingField = value;
            }
        }

        public static TriangleGames.TrainResEditor.GraphViewLinkStyle GraphViewLinkStyle
        {
            [CompilerGenerated]
            get
            {
                return GraphViewLinkStyle__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                GraphViewLinkStyle__BackingField = value;
            }
        }

        public static bool HideObsoleteActions
        {
            [CompilerGenerated]
            get
            {
                return HideObsoleteActions__BackingField;
            }
            [CompilerGenerated]
            set
            {
                HideObsoleteActions__BackingField = value;
            }
        }

        public static bool HideUnusedEvents
        {
            [CompilerGenerated]
            get
            {
                return HideUnusedEvents__BackingField;
            }
            [CompilerGenerated]
            set
            {
                HideUnusedEvents__BackingField = value;
            }
        }

        public static bool HideUnusedParams
        {
            [CompilerGenerated]
            get
            {
                return HideUnusedParams__BackingField;
            }
            [CompilerGenerated]
            set
            {
                HideUnusedParams__BackingField = value;
            }
        }

        public static bool JumpToBreakpoint
        {
            [CompilerGenerated]
            get
            {
                return JumpToBreakpoint__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                JumpToBreakpoint__BackingField = value;
            }
        }

        public static bool KeepActionBrowserOpen
        {
            [CompilerGenerated]
            get
            {
                return KeepActionBrowserOpen__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                KeepActionBrowserOpen__BackingField = value;
            }
        }

        public static bool LoadAllPrefabs
        {
            [CompilerGenerated]
            get
            {
                return LoadAllPrefabs__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LoadAllPrefabs__BackingField = value;
            }
        }

        public static bool LockGraphView
        {
            [CompilerGenerated]
            get
            {
                return LockGraphView__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LockGraphView__BackingField = value;
            }
        }

        public static bool LogCollapseSystemEvents
        {
            [CompilerGenerated]
            get
            {
                return LogCollapseSystemEvents__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LogCollapseSystemEvents__BackingField = value;
            }
        }

        public static bool LogHideUnusedEvents
        {
            [CompilerGenerated]
            get
            {
                return LogHideUnusedEvents__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LogHideUnusedEvents__BackingField = value;
            }
        }

        public static bool LogPauseOnSelect
        {
            [CompilerGenerated]
            get
            {
                return LogPauseOnSelect__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LogPauseOnSelect__BackingField = value;
            }
        }

        public static bool LogShowSentBy
        {
            [CompilerGenerated]
            get
            {
                return LogShowSentBy__BackingField;
            }
            [CompilerGenerated]
            set
            {
                LogShowSentBy__BackingField = value;
            }
        }

        public static int MaxReEnterStateCount
        {
            [CompilerGenerated]
            get
            {
                return MaxReEnterStateCount__BackingField;
            }
            [CompilerGenerated]
            set
            {
                MaxReEnterStateCount__BackingField = value;
            }
        }

        public static bool MirrorDebugLog
        {
            [CompilerGenerated]
            get
            {
                return MirrorDebugLog__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                MirrorDebugLog__BackingField = value;
            }
        }

        public static string NewStateName
        {
            [CompilerGenerated]
            get
            {
                return NewStateName__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                NewStateName__BackingField = value;
            }
        }

        public static string ScreenshotsPath
        {
            [CompilerGenerated]
            get
            {
                return ScreenshotsPath__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ScreenshotsPath__BackingField = value;
            }
        }

        public static int SelectedActionCategory
        {
            [CompilerGenerated]
            get
            {
                return SelectedActionCategory__BackingField;
            }
            [CompilerGenerated]
            set
            {
                SelectedActionCategory__BackingField = value;
            }
        }

        public static bool SelectFSMInGameView
        {
            [CompilerGenerated]
            get
            {
                return SelectFSMInGameView__BackingField;
            }
            [CompilerGenerated]
            set
            {
                SelectFSMInGameView__BackingField = value;
            }
        }

        public static bool SelectNewVariables
        {
            [CompilerGenerated]
            get
            {
                return SelectNewVariables__BackingField;
            }
            [CompilerGenerated]
            set
            {
                SelectNewVariables__BackingField = value;
            }
        }

        public static bool SelectStateOnActivated
        {
            [CompilerGenerated]
            get
            {
                return SelectStateOnActivated__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                SelectStateOnActivated__BackingField = value;
            }
        }

        public static bool ShowActionParameters
        {
            [CompilerGenerated]
            get
            {
                return ShowActionParameters__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowActionParameters__BackingField = value;
            }
        }

        public static bool ShowActionPreview
        {
            [CompilerGenerated]
            get
            {
                return ShowActionPreview__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowActionPreview__BackingField = value;
            }
        }

        public static bool ShowCommentsInGraphView
        {
            [CompilerGenerated]
            get
            {
                return ShowCommentsInGraphView__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                ShowCommentsInGraphView__BackingField = value;
            }
        }

        public static bool ShowEditWhileRunningWarning
        {
            [CompilerGenerated]
            get
            {
                return ShowEditWhileRunningWarning__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                ShowEditWhileRunningWarning__BackingField = value;
            }
        }

        public static bool ShowHints
        {
            [CompilerGenerated]
            get
            {
                return ShowHints__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowHints__BackingField = value;
            }
        }

        public static bool ShowScrollBars
        {
            [CompilerGenerated]
            get
            {
                return ShowScrollBars__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowScrollBars__BackingField = value;
            }
        }

        public static bool ShowStateDescription
        {
            [CompilerGenerated]
            get
            {
                return ShowStateDescription__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowStateDescription__BackingField = value;
            }
        }

        public static bool ShowStateLabelsInGameView
        {
            [CompilerGenerated]
            get
            {
                return ShowStateLabelsInGameView__BackingField;
            }
            [CompilerGenerated]
            set
            {
                ShowStateLabelsInGameView__BackingField = value;
            }
        }

        public static int SnapGridSize
        {
            [CompilerGenerated]
            get
            {
                return SnapGridSize__BackingField;
            }
            [CompilerGenerated]
            set
            {
                SnapGridSize__BackingField = value;
            }
        }

        public static string StartStateName
        {
            [CompilerGenerated]
            get
            {
                return StartStateName__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                StartStateName__BackingField = value;
            }
        }

        public static int StateMaxWidth
        {
            [CompilerGenerated]
            get
            {
                return StateMaxWidth__BackingField;
            }
            [CompilerGenerated]
            set
            {
                StateMaxWidth__BackingField = value;
            }
        }

        public static bool SyncLogSelection
        {
            [CompilerGenerated]
            get
            {
                return SyncLogSelection__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                SyncLogSelection__BackingField = value;
            }
        }

        public static bool UnloadPrefabs
        {
            [CompilerGenerated]
            get
            {
                return UnloadPrefabs__BackingField;
            }
            [CompilerGenerated]
            set
            {
                UnloadPrefabs__BackingField = value;
            }
        }
    }
}

